<!DOCTYPE html>
<html>

<head>
    <title>{$chapter.name}</title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="{$Think.config._index_}css/read300-aeeaa968bc_1.css" rel="stylesheet" type="text/css"/>
    <style>
        .font{
            letter-spacing:2px;
            text-indent:40px;
            line-height:50px;
        }
    </style>
</head>

<body>
<!-- chapterid为章节id，bookid为书籍id，islogin为登录状态 -->
<div id="content" data-bookid="711249" data-chapterid="85017816" data-islogin=''>
    <!-- 左边导航 start -->
    <div class="left_bar_list bar_list" id="left_bar_box">
        <!-- btn_on为点击状态 -->
        <div class="left_bar">
            <a href="javascript:;" class="directory_btn">
                <i></i>
                <span>目录</span>
            </a>
        </div>
        <div class="left_bar">
            <a href="javascript:;" class="setUp_btn">
                <i></i>
                <span>设置</span>
            </a>
        </div>
        <div class="left_bar">
            <!-- 已在书架状态 -->
            <a href="javascript:;" class="bookcase_on  hidden ">
                <span>已在书架</span>
            </a>

            <!-- 未在书架状态 -->
            <a href="javascript:;" class="bookcase_btn ">
                <i></i>
                <span>书架</span>
            </a>
        </div>
        <!-- 目录和书签面板 start -->

        <div class="db_box left_panel hidden">
            <div class="db_type clearfix">
                <a href="javascript:;" class="directory_type dbtype_on">
                    <span>目录</span>
                </a>
                <a href="javascript:;" class="bookmarks_type hidden">
                    <span>书签</span>
                </a>
            </div>
            <a href="javascript:;" class="db_type_close"></a>
            <!-- 目录面板 start -->
            <div class="directory_box m_Height" id="directory_box">

            </div>
            <!-- 目录面板 end -->
            <!-- 标签面板 start -->
            <div class="bookmarks_box m_Height hidden" id="bookmarks_box">

            </div>
            <!-- 标签面板 end -->
        </div>
        <!-- 目录和书签面板 end -->
        <!-- 设置面板 start -->
        <div class="setUp_box left_panel hidden">
            <p class="setUp_txt">快来设置你喜欢的阅读方式吧~</p>
            <a href="javascript:;" class="setUp_close"></a>
            <div class="color_list clearfix">
                <p>阅读主题：</p>
                <a href="javascript:;" data-color='brown' class="brown_btn">
                    <i class="color_on"></i>
                </a>
                <a href="javascript:;" data-color='green' class="green_btn">
                    <i class=""></i>
                </a>
                <a href="javascript:;" data-color='pink' class="pink_btn">
                    <i class=""></i>
                </a>
                <a href="javascript:;" data-color='blue' class="blue_btn">
                    <i class=""></i>
                </a>
                <a href="javascript:;" data-color='gray' class="gray_btn">
                    <i class=""></i>
                </a>
                <a href="javascript:;" data-color='black' class="black_btn">
                    <i class=""></i>
                </a>
            </div>
            <div class="font_box clearfix">
                <p>字体大小：</p>
                <div class="">
                    <a href="javascript:;" class="font_prev font_size_btn">
                        <span>A -</span>
                    </a>
                    <a class="font_size pub_num">
                        <span>18</span>
                    </a>
                    <a href="javascript:;" class="font_next font_size_btn">
                        <span>A +</span>
                    </a>
                </div>
            </div>
            <div class="page_width_box clearfix">
                <p>页面宽度：</p>
                <div class="">
                    <a href="javascript:;" class="page_prev page_width_btn">
                        <i></i>
                        <span>-</span>
                    </a>
                    <a class="page_width pub_num">
                        <span>900</span>
                    </a>
                    <a href="javascript:;" class="page_next page_width_btn">
                        <i></i>
                        <span>+</span>
                    </a>
                </div>
            </div>
            <a href="javascript:;" class="save_btn">保存</a>
        </div>
        <!-- 设置面板 end -->
    </div>
    <!-- 左边导航 end -->
    <!-- 右边导航 start-->
    <div class="right_bar_list" id="right_bar_box">
        <div class="right_bar">
            <a href="javascript:;" class="vote_btn">
                <i></i>
                <span>投票</span>
            </a>
        </div>
        <div class="right_bar">
            <a href="javascript:;" class="exceptional_btn">
                <i></i>
                <span>打赏</span>
            </a>
        </div>
        <div class="right_bar">
            <a href="javascript:void(0)" class="comments_btn">
                <i></i>
                <span>评论</span>
            </a>
        </div>
    </div>
    <!-- 右边导航 end -->
    <!-- 页面主体 start -->
    <div class="con_box">
        <!-- 书籍头部 start -->
        <!-- 书籍头部 end -->
        <!-- 阅读主体内容 start -->
        <div class="read_details_box"  style="min-height: 700px" >
            <div class="chapter">
                <div class="clearfix">
                    <h4>{$chapter.name}</h4>
                </div>
                <div class="chapter_details clearfix">
                    <span title="{$book.name}">书名：{$book.name}</span>
                    <span>作者：{$book.author}</span>
                    <span>字数：{$book.words}</span>
                    <span>更新时间：{$book.update}</span>
                </div>
            </div>
            <div class="read_details font" style="white-space: pre-line;">
                {$content.content | mb_substr=0,200}
            </div>
            <!-- vip章节显示start -->
            <div class="vip_details">
                <h4>本节为收费章节，立即订阅畅享精彩内容</h4>
                <div class="vip_list_box">
                    <ul class="vip_list clearfix">
                        <li class="vip_chapter_num">
                            <p>{$chapter.size}<span>字</span></p>
                            <div class="vip_type clearfix">
                                <i></i>
                                <b>章节字数</b>
                            </div>
                        </li>
                        <li class="vip_price">
                            <p>{$money}<span>书币</span></p>
                            <div class="vip_type clearfix">
                                <i></i>
                                <b>价格</b>
                            </div>
                        </li>
                    </ul>
                </div>
                <center>
                    <button href="javascript:;" style="font-size: 35px;" class="order_buy">订购本章</button>
                </center>
                <br>
                <div align="center">
                    <label><input type="checkbox">自动订购下一章</label>
                    <br>
                    <h3 id="msg" style="color:red;"></h3>
                </div>
                <input type="hidden" name="chapter_id" value="{$chapter.id}">
                <input type="hidden" name="money" value="{$money}">
                <input type="hidden" name="index" value="{$chapter.index}">
                <input type="hidden" name="book_id" value="{$book.id}">
                <!-- 默认勾选需添加auto_on -->
                <!--<div class="auto_order_btn" data-auto='true'>-->
                    <!--<i></i>-->
                    <!--<p>自动订购下一章</p>-->
                <!--</div>-->
            </div>
            <!-- vip章节显示end -->
        </div>
        <!-- 阅读主体内容 end -->
        <!-- 分页 start -->
        <div class="paging_box">
            <a href="/index/chapter/read/book_id/{$book.id}/chapter_index/{$chapter.index-1}" class="paging_left  " id="paging_left">上一章</a>
            <a href="" class="paging_directory">目录</a>
            <a href="/index/chapter/read/book_id/{$book.id}/chapter_index/{$chapter.index+1}" class="paging_right " id="paging_right">下一章</a>
        </div>
        <!-- 分页 end -->
        <!-- 广告 start -->
        <!-- 广告 end -->
    </div>
    <!-- 页面主体 end -->
    <div class="box_shadow_bg hidden"></div>
</div>
<!--<input type="hidden" id="bookPartResourceUrl" value="http://m.tadu.com/_book_part_half/f71a62c7f2d3cf54ac7261e2bbe6a65f">-->
<!--<input type="hidden" id="canReadFlag" value="1">-->
</body>
<script src="{$Think.config._index_}js/jquery-1-22e85f4f06.12.4.min.js"></script>
<script src="{$Think.config._index_}js/index_main_300-a2ed9ece64.js"></script>
<script src="{$Think.config._index_}js/read300-78a0a516db.js"></script>
<script>
    $(".order_buy").click(function(){
        var is_check = $("input[type='checkbox']").is(':checked');
        var chapter_id = $("input[name='chapter_id']").val();
        // var book_id = $("input[name='book_id']").val();
        var money = $("input[name='money']").val();
        // var index = $("input[name='index']").val();
        // alert(is_check);
        // alert(chapter_id);
        $.post("/index/chapter/chapterBuy",
            {is_check:is_check,chapter_id:chapter_id,money:money},
            function(data){
                if(data.state === 200){
                    window.location.href="/index/chapter/read/book_id/{$book.id}/chapter_index/{$chapter.index}";
                }else{
                    $("#msg").html(data.msg);
                }
            });
    });
</script>
</html>